﻿using MockPrjTeam1.DAO;
using MockPrjTeam1.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MockPrjTeam1.Biz
{
    public class GovOfficeBiz
    {
        public List<GovOffice> GetActive()
        {
            var dao = new GovOfficeDAO();
            return dao.GetActive();
        }

        public List<GovOffice> GetAll()
        {
            var dao = new GovOfficeDAO();
            return dao.GetAll();
        }

        public GovOffice GetOne(int id)
        {
            var dao = new GovOfficeDAO();
            return dao.GetOne(id);
        }

        public bool CheckName(string name, int id)
        {
            var dao = new GovOfficeDAO();
            return dao.CheckName(name, id);
        }

        public bool Edit(GovOffice entity)
        {
            var dao = new GovOfficeDAO();
            return dao.Edit(entity);
        }

        public bool Create(GovOffice entity)
        {
            var dao = new GovOfficeDAO();
            return dao.Create(entity);
        }

        public List<GovOffice> Filter(int filterId, int isActive)
        {
            var dao = new GovOfficeDAO();
            return dao.Filter(filterId, isActive);
        }
    }
}